<!-- collect -->
<template>
  <div>
    <van-nav-bar title="收藏列表">
      <template #left>
        <van-icon name="arrow-left" @click="$router.back()" />
      </template>
    </van-nav-bar>
    <HouseItem
      v-for="(item, index) in list"
      :key="index"
      :obj="item"
      :houseCode="item.list"
    />
  </div>
</template>

<script>
import { favoritesListAPI } from '@/api'
import HouseItem from '@/views/List/components/houseItem.vue'
export default {
  data () {
    return {
      list: []
    }
  },
  components: {
    HouseItem
  },
  async created () {
    const res = await favoritesListAPI()
    console.log(res)
    this.list = res.data.body
  }
}
</script>
<style lang='less' scoped>
</style>
